unsigned __bits(8) mas[10];
unsigned __in __bits(8) n;

unsigned __bits(8) res[10];


void main(void) {
unsigned __bits(4) i;

unsigned __bits(4) k = 0;
for(i = 0; i < n; i++) if(mas[i] % 3 == 0) {
res[k] = mas[i];
k++;
}

if(k == 0) for(i = 0; i < n; i++) mas[i] = 0;
}


------------------------------------------------------------
---------------------
unsigned __bits(8) mas[10];
unsigned __in __bits(8) n;

unsigned __bits(8) res[10];


void main(void) {
unsigned __bits(4) k = 0;
for(unsigned __bits(4) i = 0; i < n; i++) if(mas[i] % 3 == 0 && mas[i] != 0) {
res[k] = mas[i];
k++;
}
}

------------------------------------------------------------
---------------------
unsigned __bits(8) mas[10];
unsigned __in __bits(8) n;

unsigned __bits(8) res[10];


void main(void) {
unsigned __bits(4) k = 0;
for(unsigned __bits(4) i = 0; i < n; i++) if(mas[i] % 3 == 0) {
res[k] = mas[i];
k++;
}
}

------------------------------------------------------------
---------------------
unsigned __bits(8) mas[10];
unsigned __bits(8) n;

unsigned __bits(8) res[10];

void main()
{
int i;
for (i = 0; i < n; i++){
if (mas[i] % 3 == 0){
res[i] = mas[i];
} else res[i] = 0;
}
}

------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;
unsigned __bits(8)f=0;
res[0]=0;
for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
f=1;
j++;
}
}
i=0;
if(f=0){
for(;i<n;i++){
res[i]=0;
}
}
}


------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;

for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
j++;
}
}
}


------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;

for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
j++;
}
}
}


------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;
res[0]=0;
for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
j++;
}
}
i=0;
if(res[0]==0){
for(;i<n;i++){
res[i]=0;
}
}
}


------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;
res[0]=0;
for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
j++;
}
}
if(res[i]==0){
i=0;
for(;i<n;i++){
res[i]=0;
}
}
}


------------------------------------------------------------
---------------------
unsigned __bits(8)mas[10];
unsigned __in __bits(8)n;

unsigned __bits(8)res[10];

void main(){
unsigned __bits(8)i=0;
unsigned __bits(8)j=0;
res[0]=0;
for(;i<n;i++){
if(mas[i]%3==0){
res[j]=mas[i];
j++;
}
}
if(res[0]==0&&res[9]!=3){
i=0;
for(;i<n;i++){
res[i]=0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __bits(8) n;

int __bits(8) res[10];

void main() {
int __bits(8) i = 0;
int __bits(8) j = 0;
int __bits(8) null = 0;

for (i = 0; i < n; i++)
{
if (mas[i] % 3 == 0)
{
res[j] = mas[i];
j++;
null = 1;
}
}
if (null = 0)
{
for (i = 0; i < n; i++)
{
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

void main() {
int i;
int kol = 0;
int f = 0;
for (i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
f = 1;
break;
}
}
if (f == 1) {
for (i = 0; i < n; i++);
if (mas[i] % 3 == 0) {
res[kol] = mas[i];
kol++;
}
} else {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

void main() {
int i;
int kol = 0;
int f = 0;
for (i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
f = 1;
break;
}
}
if (f == 1) {
for (i = 0; i < n; i++);
if (mas[i] % 3 == 0) {
res[kol] = mas[i];
kol++;
}
} else {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[32];
int n;
int res[32];
void main() {
int j = 0;
int ind = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
j++;
ind++;
}
}

if (ind == 0){
for (int r = 0 ; r<n; r++){
res[r] = 0;
}
}

}


------------------------------------------------------------
---------------------
unsigned __bits(8) mas[10];
unsigned __bits(8) res[10];
unsigned __bits(8) n;

void main() {
unsigned __bits(8) count = 0;
for (unsigned __bits(8) i = 0; i < n; i++) {
res[i] = 0;
}
for (unsigned __bits(8) i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[count] = mas[i];
count++;
}
}
return;
}


------------------------------------------------------------
---------------------
int mas[32];
int n;
int res[32];
void main() {
int j = 0;
int ind = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
j++;
ind++;
}
}

if (ind == 0){
for (int r = 0 ; r<n; r++){
res[r] = 0;
}
}

}


------------------------------------------------------------
---------------------
unsigned n;
unsigned f[12];
unsigned r[11];

void main() {
unsigned i;
unsigned step;

for (i = 0; i < n; i++) {
step = n - i;
r[i] = f[i] * step;
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

void main()
{
int __bits(8) i;
int __bits(8) cnt = 0;
for (i = 0; i < n; i++)
{
if (mas[i] % 3 == 0)
{
res[i] = mas[i];
cnt++;
}
}
if (cnt == 0)
{
for (i = 0; i < n; i++)
{
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
nt __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

void main() {
int j = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[j] = mas[i];
}
j++;
}

if (j == 0) {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(1) mas[10];
int __in __bits(1) n;
int __bits(1) res[10];

void main() {
int j = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[j++] = mas[i];
}
}

if (j == 0) {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
else {
for (int i = j; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(1) mas[10];
int __in __bits(1) n;
int __bits(1) res[10];

void main() {
int j = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[j++] = mas[i];
}
}

if (j == 0) {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
else {
for (int i = j; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

int __bits(8) fl = 0;

void main() {
fl = 0;
int j = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[j++] = mas[i];
}
}

if (j == 0) {
for (i = 0; i < n; i++) {
res[i] = 0;
}
}
else {
for (int i = j; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) res0, res1, res2, res3, res4, res5, res6, res7, res8, res9;

void main() {
// ¦б¦-¦-TЗ¦-¦¬¦- ¦¬TЙ¦¦¦- ¦¦TА¦-TВ¦-TЛ¦¦ TВTА¦¦¦- ¦¬ TД¦-TА¦-¦¬TАTГ¦¦¦- ¦-TА¦¦¦-¦¦¦-¦-TЛ¦¦ TА¦¦¦¬TГ¦¬TМTВ¦-TВ
char temp[10];
int count = 0;

for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
temp[count] = mas[i];
count++;
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ TВTА¦¦¦-, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- n ¦-TГ¦¬¦¦¦¦
if (count == 0) {
for (int i = 0; i < n; i++) {
temp[i] = 0;
}
count = n;
}

// ¦Ч¦-¦¬¦-¦¬¦-TП¦¦¦- ¦-TЛTЕ¦-¦+¦-TЛ¦¦ ¦¬¦¦TА¦¦¦-¦¦¦-¦-TЛ¦¦
res0 = (count > 0) ? temp[0] : 0;
res1 = (count > 1) ? temp[1] : 0;
res2 = (count > 2) ? temp[2] : 0;
res3 = (count > 3) ? temp[3] : 0;
res4 = (count > 4) ? temp[4] : 0;
res5 = (count > 5) ? temp[5] : 0;
res6 = (count > 6) ? temp[6] : 0;
res7 = (count > 7) ? temp[7] : 0;
res8 = (count > 8) ? temp[8] : 0;
res9 = (count > 9) ? temp[9] : 0;
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) res0, res1, res2; // 3 ¦-¦-¦¦TВ¦- = 3 ¦¬¦¦TА¦¦¦-¦¦¦-¦-TЛTЕ ¦¬¦- 8 ¦-¦¬TВ

void main() {
// ¦Ш¦-¦¬TЖ¦¬¦-¦¬¦¬¦¬¦¬TАTГ¦¦¦- ¦-TЛTЕ¦-¦+ ¦-TГ¦¬TП¦-¦¬
res0 = 0;
res1 = 0;
res2 = 0;

int res_index = 0;

// ¦ЯTА¦-TЕ¦-¦+¦¬¦- ¦¬¦- ¦-TБ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВ¦-¦- mas
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
// ¦Ч¦-¦¬¦¬TБTЛ¦-¦-¦¦¦- ¦- TБ¦-¦-TВ¦-¦¦TВTБTВ¦-TГTОTЙ¦¬¦¦ ¦-TЛTЕ¦-¦+ (¦-¦-¦¦TБ¦¬¦-TГ¦- 3 TН¦¬¦¦¦-¦¦¦-TВ¦-)
if (res_index == 0) res0 = mas[i];
else if (res_index == 1) res1 = mas[i];
else if (res_index == 2) res2 = mas[i];
res_index++;

// ¦ХTБ¦¬¦¬ TГ¦¦¦¦ ¦¬¦-¦¬¦-¦¬¦-¦¬¦¬¦¬ 3 TН¦¬¦¦¦-¦¦¦-TВ¦-, ¦-TЛTЕ¦-¦+¦¬¦-
if (res_index >= 3) break;
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- ¦-TГ¦¬TП¦-¦¬ (TГ¦¦¦¦ ¦¬¦-¦¬TЖ¦¬¦-¦¬¦¬¦¬¦¬TА¦-¦-¦-¦-¦-)
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

void main(){
int __bits(16) i;
for (i = 0; i < n; i++) {
res[i] = 0;
}
for (i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
}else{
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int __bits(16) mas[10];
int __in __bits(16) n;
int __bits(16) res[10];

void main(){
int __bits(16) i;
for (i = 0; i < n; i++) {
res[i] = 0;
}
for (i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
}else{
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) res0, res1, res2; // 3 ¦-¦-¦¦TВ¦- = 3 ¦¬¦¦TА¦¦¦-¦¦¦-¦-TЛTЕ ¦¬¦- 8 ¦-¦¬TВ

void main() {
// ¦Ш¦-¦¬TЖ¦¬¦-¦¬¦¬¦¬¦¬TАTГ¦¦¦- ¦-TЛTЕ¦-¦+ ¦-TГ¦¬TП¦-¦¬
res0 = 0;
res1 = 0;
res2 = 0;

int res_index = 0;

// ¦ЯTА¦-TЕ¦-¦+¦¬¦- ¦¬¦- ¦-TБ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВ¦-¦- mas
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
// ¦Ч¦-¦¬¦¬TБTЛ¦-¦-¦¦¦- ¦- TБ¦-¦-TВ¦-¦¦TВTБTВ¦-TГTОTЙ¦¬¦¦ ¦-TЛTЕ¦-¦+ (¦-¦-¦¦TБ¦¬¦-TГ¦- 3 TН¦¬¦¦¦-¦¦¦-TВ¦-)
if (res_index == 0) res0 = mas[i];
else if (res_index == 1) res1 = mas[i];
else if (res_index == 2) res2 = mas[i];
res_index++;

// ¦ХTБ¦¬¦¬ TГ¦¦¦¦ ¦¬¦-¦¬¦-¦¬¦-¦¬¦¬¦¬ 3 TН¦¬¦¦¦-¦¦¦-TВ¦-, ¦-TЛTЕ¦-¦+¦¬¦-
if (res_index >= 3) break;
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- ¦-TГ¦¬TП¦-¦¬ (TГ¦¦¦¦ ¦¬¦-¦¬TЖ¦¬¦-¦¬¦¬¦¬¦¬TА¦-¦-¦-¦-¦-)
}


------------------------------------------------------------
---------------------
int __bits(8) mas[10];
int __in __bits(8) n;
int __bits(8) res[10];

int main() {
int hasMultiples = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
hasMultiples = 1;
} else {
res[i] = 0;
}
}
if (hasMultiples == 0) {
for (int i = 0; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int mas[10];
int __in __bits(16) n;
int res[10];

void main(){
int __bits(16) i;
for (i = 0; i < n; i++) {
res[i] = 0;
}
for (i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
}else{
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) RES;

void main() {
char temp[10] = {0,0,0,0,0,0,0,0,0,0};
int idx = 0;

// ¦ШTЙ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВTЛ ¦¦TА¦-TВ¦-TЛ¦¦ 3
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
temp[idx++] = mas[i];
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- n ¦-TГ¦¬¦¦¦¦
if (idx == 0) {
for (int i = 0; i < n && i < 10; i++) {
temp[i] = 0;
}
}

// ¦С¦¦TА¦¦¦- ¦¬¦¦TА¦-TЛ¦¦ TН¦¬¦¦¦-¦¦¦-TВ ¦¦¦-¦¦ RES (¦¦TБ¦¬¦¬ ¦- ¦¬¦-¦+¦-¦-¦¬¦¬ ¦-TГ¦¦¦¦¦- ¦-¦+¦¬¦- ¦-TЛTЕ¦-¦+)
RES = temp[0];
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) res0, res1, res2, res3, res4, res5, res6, res7, res8, res9;

void main() {
// ¦Ш¦-¦¬TЖ¦¬¦-¦¬¦¬¦¬¦¬TАTГ¦¦¦- ¦-TБ¦¦ ¦-TЛTЕ¦-¦+TЛ ¦-TГ¦¬TП¦-¦¬
res0 = 0; res1 = 0; res2 = 0; res3 = 0; res4 = 0;
res5 = 0; res6 = 0; res7 = 0; res8 = 0; res9 = 0;

int res_index = 0;

// ¦ЯTА¦-TЕ¦-¦+¦¬¦- ¦¬¦- ¦-TБ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВ¦-¦- mas
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
// ¦Ч¦-¦¬¦¬TБTЛ¦-¦-¦¦¦- ¦- TБ¦-¦-TВ¦-¦¦TВTБTВ¦-TГTОTЙ¦¬¦¦ ¦-TЛTЕ¦-¦+
switch(res_index) {
case 0: res0 = mas[i]; break;
case 1: res1 = mas[i]; break;
case 2: res2 = mas[i]; break;
case 3: res3 = mas[i]; break;
case 4: res4 = mas[i]; break;
case 5: res5 = mas[i]; break;
case 6: res6 = mas[i]; break;
case 7: res7 = mas[i]; break;
case 8: res8 = mas[i]; break;
case 9: res9 = mas[i]; break;
}
res_index++;
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- ¦¬¦¦TА¦-TЛ¦¦ n ¦-TЛTЕ¦-¦+¦-¦- ¦-TГ¦¬TП¦-¦¬
if (res_index == 0) {
for (int i = 0; i < n && i < 10; i++) {
switch(i) {
case 0: res0 = 0; break;
case 1: res1 = 0; break;
case 2: res2 = 0; break;
case 3: res3 = 0; break;
case 4: res4 = 0; break;
case 5: res5 = 0; break;
case 6: res6 = 0; break;
case 7: res7 = 0; break;
case 8: res8 = 0; break;
case 9: res9 = 0; break;
}
}
}
}


------------------------------------------------------------
---------------------
char __bits(16) mas[32];
int __bits(16) n;
char __bits(16) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(16) mas[32];
int __bits(16) n;
char __bits(16) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32];
int __bits(8) n;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32];
int __bits(8) n;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32];
int __bits(8) n;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32] = {0,0,0};
int __bits(8) n = 3;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0 && mas[i]!=0 ){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32];
int __bits(8) n = 3;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0 && mas[i]!=0 ){
res[j] = mas[i];
checker++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[j] = 0;
}
}
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) RES;

void main() {
char temp[10] = {0,0,0,0,0,0,0,0,0,0};
int idx = 0;

// ¦ШTЙ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВTЛ ¦¦TА¦-TВ¦-TЛ¦¦ 3
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
temp[idx++] = mas[i];
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- n ¦-TГ¦¬¦¦¦¦
if (idx == 0) {
for (int i = 0; i < n && i < 10; i++) {
temp[i] = 0;
}
}

// ¦С¦¦TА¦¦¦- ¦¬¦¦TА¦-TЛ¦¦ TН¦¬¦¦¦-¦¦¦-TВ ¦¦¦-¦¦ RES (¦¦TБ¦¬¦¬ ¦- ¦¬¦-¦+¦-¦-¦¬¦¬ ¦-TГ¦¦¦¦¦- ¦-¦+¦¬¦- ¦-TЛTЕ¦-¦+)
RES = temp[0];
}


------------------------------------------------------------
---------------------
char __bits(8) mas[10];
char __bits(8) n;
char __out __bits(8) RES;

void main() {
char temp[10] = {0,0,0,0,0,0,0,0,0,0};
int idx = 0;

// ¦ШTЙ¦¦¦- TН¦¬¦¦¦-¦¦¦-TВTЛ ¦¦TА¦-TВ¦-TЛ¦¦ 3
for (int i = 0; i < n && i < 10; i++) {
if (mas[i] % 3 == 0) {
temp[idx++] = mas[i];
}
}

// ¦ХTБ¦¬¦¬ ¦-¦¦ ¦-¦-TИ¦¬¦¬ ¦¦TА¦-TВ¦-TЛTЕ 3, ¦¬¦-¦¬¦-¦¬¦-TП¦¦¦- n ¦-TГ¦¬¦¦¦¦
if (idx == 0) {
for (int i = 0; i < n && i < 10; i++) {
temp[i] = 0;
}
}

// ¦С¦¦TА¦¦¦- ¦¬¦¦TА¦-TЛ¦¦ TН¦¬¦¦¦-¦¦¦-TВ ¦¦¦-¦¦ RES (¦¦TБ¦¬¦¬ ¦- ¦¬¦-¦+¦-¦-¦¬¦¬ ¦-TГ¦¦¦¦¦- ¦-¦+¦¬¦- ¦-TЛTЕ¦-¦+)
RES = temp[0];
}


------------------------------------------------------------
---------------------
char __bits(8) mas[32] ;
int __bits(8) n ;
char __bits(8) res[32];
void main (){
int checker = 0;
int j = 0;
for (int i = 0 ; i<n; i++){
if (mas[i] % 3 == 0 ){
res[j] = mas[i];
checker ++;
j++;
}
}
if (checker == 0){
for (int i = 0 ; i<n ;i++){
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int mas[10];
int __in __bits(8) n;
int res[10];

int main() {
int hasMultiples = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
hasMultiples = 1;
}
}
if (hasMultiples == 0) {
for (int i = 0; i < n; i++) {
res[i] = 0;
}
}
}


------------------------------------------------------------
---------------------
int mas[8];
int __in __bits(8) n;
int res[8];

int main() {
int hasMultiples = 0;
for (int i = 0; i < n; i++) {
if (mas[i] % 3 == 0) {
res[i] = mas[i];
hasMultiples = 1;
}
}
if (hasMultiples == 0) {
for (int i = 0; i < n; i++) {
res[i] = 0;
}
}
}





